<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" charset="utf-8">
        //日期类型
        var date = new Date();
        alert(date);
        var year = date.getFullYear();
        var month = date.getMonth()+1;
        var day = date.getDate();
        var hour = date.getHours();
        var min = date.getMinutes();
        var second = date.getSeconds();
        var week = date.getDay();
        document.write("今天是："+year+"年"+month+"月"+day+"日"+  hour+":"+min+":"+second  +"星期"+week);
    </script>
</head>
<body>
</body>
</html>